home *** CD-ROM | disk | FTP | other *** search
File List | 1987-09-03 | 3.0 KB | 76 lines |
- ' ************************************************************
- ' ***** Wipedemo.lst by R. Warner & BC Computing 5/11/87 *****
- ' ****************** All rights reserved *********************
- ' ************************************************************
- '
- C_num=0
- De_rezz=Xbios(4) ! find current screen resolution
- If De_rezz=0 Then ! 0=Low Res
- C_num=16 ! number of available colors
- X_width=320 ! max screen width
- Y_height=200 ! max screen height
- Else
- If De_rezz=1 Then ! 1=Medium Res !
- C_num=4 ! see above !
- X_width=640
- Y_height=200
- Else
- If De_rezz=2 Then ! 2=High Res !
- C_num=2 ! see top !
- X_width=640
- Y_height=400
- Endif
- Endif
- Endif
- Dim Sys_pal%(15,3) ! save room for default system pallette
- @Get_sys_pal
- Graphmode 1 ! 1=replace 2=transparent 3=xor 4=rev. transparent
- Defline 1,1,0,0 !10 ! (1,1,0,0 is default) type,width,endstyle,endstyle
- ' ! type must be <= 6, endstyle must be <= 2
- For Nxt_culor=C_num Downto 0 ! if a single wipe is desired, then -
- @Wipe(Nxt_culor) ! the numeric arg is a SINGLE color pallette value
- Next Nxt_culor ! instead of running thru the pallette...
- ' ! delete the previous for...next loop for 1 value
- ' @Wipe(N) ! and replace the @Wipe(nxt_culor) with @Wipe(N)
- ' ! where N=the wipe color. Must be less than C_num!
- @Reset_sys_pal ! this restores the system pallette if need be...
- ' Cls ! this may or may not be necessary...
- End
- Procedure Wipe(Culor) ! 0-15 for lores, 0-3 for medres, 0-1 for hires
- Color Culor ! color passed as value in @wipe(n) where n=culor
- For S1%=0 To 0.5 !1 ! slide in color from the top
- ' ! 0.5 slides colors over each other...
- ' ! 1 slides white (or background) in between wipe
- For S2%=S1%+0 To X_width ! width of screen detirmined by 4th arg (i.e. 640)
- ' ! for bottom slide-in (instead of top) use:
- ' ! s2%,0,s2%,x_width (in place of the next line)
- Line 0,S2%,X_width,S2% ! height " " determined by 3rd arg (i.e. 200)
- Next S2%
- Next S1%
- Return
- Procedure Get_sys_pal
- For Pal_reg=0 To 15
- Dpoke Contrl,26
- Dpoke Contrl+2,0
- Dpoke Contrl+6,2
- Dpoke Intin,Pal_reg
- Dpoke Intin+2,0
- Vdisys
- Sys_pal%(Pal_reg,0)=Dpeek(Intout+2)
- Sys_pal%(Pal_reg,1)=Dpeek(Intout+4)
- Sys_pal%(Pal_reg,2)=Dpeek(Intout+6)
- Next Pal_reg
- Return
- Procedure Reset_sys_pal
- For Pal_reg=0 To 15
- Dpoke Contrl,14
- Dpoke Contrl+2,0
- Dpoke Contrl+6,4
- Dpoke Intin,Pal_reg
- Dpoke Intin+2,Sys_pal%(Pal_reg,0)
- Dpoke Intin+4,Sys_pal%(Pal_reg,1)
- Dpoke Intin+6,Sys_pal%(Pal_reg,2)
- Vdisys
- Next Pal_reg
- Return
-